package org.lib.postgresqlhello.config;

import org.apache.ibatis.plugin.Interceptor;
import org.lib.postgresqlhello.record.shard.TableShardInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * mybatis配置
 * @author ben
 * @date 2021-11-18 23:03:19 CST
 */
@Configuration
public class MyBatisConfig {

	/**
	 * mybatis自定义拦截器
	 * @author ben
	 * @date 2021-11-18 23:04:02 CST
	 * @return
	 */
	@Bean
	public Interceptor getInterceptor() {
		return new TableShardInterceptor();
	}
	
}
